import { ProductService } from '../service/product.service';
import { Controller, Get, Param } from "@nestjs/common";

@Controller('products')
export class Product1Controller{
    constructor(private readonly productService:ProductService){}
    @Get()
    getAllProducts(){
        return this.productService.getAllProducts();
    }
    @Get(':id')
    getProductById(@Param('id') id:string){
        return this.productService.getProductById(+id);

    }

}